package com.epam.kulibaba.components.catalog;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

import com.epam.kulibaba.components.Component;

public class ProductsCatalog extends Component {
	public static final String CATALOG = ".catalog";
	
	public static final String COMPARELINK = "span.compare_redirect_link a.head-compare-link";

	@FindBy(css = ProductsCatalog.CATALOG)
	private WebElement catalog;

	
	@FindBy(css = ProductsCatalog.COMPARELINK)
	private WebElement compareLink;

	public WebElement getCompareLink() {
		return compareLink;
	}
	
	public WebElement getCatalog() {
		return catalog;
	}

	public static ProductsCatalog getProductsCatalog(WebDriver driver) {
		ProductsCatalog productsCatalog = PageFactory.initElements(driver,
				ProductsCatalog.class);
		return productsCatalog;
	}
}
